<%@ page contentType="text/html; charset=utf-8" language="java" pageEncoding="utf-8" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>开发文档-传感器</title>
		<link type="text/css" rel="stylesheet" href="../../../css/pages/xlink/global.css">
		<link type="text/css" rel="stylesheet" href="../../../css/pages/xlink/developer.css">
	</head>
	<body>
		<div id="top">
			<div id="top_logo"><span>Xlink</span></div>
			<div id="top_right">
				<div id="top_right_ul1"> 
				    <ul>
				    	<li><a href="contact.html">联系我们</a></li>
				    	<li><a href="#">工作机会</a></li>
				    	<li><a href="mydevice.html">用户中心</a></li>
				    </ul>
				</div>
				<div id="top_right_ul2">
					<ul>
					<li><a hre="index.html">首页</a></li>
					<li><a hre="developer.html">开发者</a></li>
					<li><a hre="#">搜索</a></li>
					<li><a hre="#">社区</a></li>
					<li><a hre="#">博客</a></li>
					<li><a hre="contact.html">联系我们</a></li>
					</ul>
				</div>
			</div>
		</div>

		<div id="banner" class="short bg8">
			<div class="inset">
				<h1>传感器 Sensors</h1>
				<p> 传感器完成采集数据的功能, 一个设备支持多个传感器. </p>
			</div>
		</div>

		<div id="first">
			<div id="left">
				<h1>导航中心</h1>
				<ul>
					<li><a href="#">快速开始</a></li>
					<li><a href="#">开发例程</a></li>
					<li><a href="#">案例分析</a></li>
					<li><a href="#">移动客户端</a></li>
					<li><a href="#">API文档</a></li>
					<li><a href="#">使用条款</a></li>
				</ul>
			</div>
			<div id="right">
				<div id="developer_main" class="devdoc">
					<h1>API文档 <i>(版本1.0，版本 <a href="#">v1.1</a> 测试中)</i></h1>
					<h2>传感器 Sensors</h2>
					<p class="info"> 传感器完成采集数据的功能, 一个设备支持多个传感器. </p>
					<table id="table_device" class="common">
						<thead>
							<tr><th colspan="3">API列表</th></tr>
						</thead>
						<tbody>
											<tr><td><a href="#">/v1.0/sensor/&lt;device_id&gt;</a></td><td width="320">创建传感器</td><td width="80"><a href="#" target="_blank">在线调试</a></td></tr>
											<tr><td><a href="#">/v1.0/sensor/&lt;device_id&gt;/&lt;sensor_id&gt;</a></td><td width="320">编辑传感器</td><td width="80"><a href="#" target="_blank">在线调试</a></td></tr>
											<tr><td><a href="#">/v1.0/sensor/&lt;device_id&gt;</a></td><td width="320">罗列传感器</td><td width="80"><a href="#" target="_blank">在线调试</a></td></tr>
											<tr><td><a href="#">/v1.0/sensor/&lt;device_id&gt;/&lt;sensor_id&gt;</a></td><td width="320">查看传感器</td><td width="80"><a href="#" target="_blank">在线调试</a></td></tr>
											<tr><td><a href="#">/v1.0/sensor/&lt;device_id&gt;/&lt;sensor_id&gt;</a></td><td width="320">删除传感器</td><td width="80"><a href="#" target="_blank">在线调试</a></td></tr>
										</tbody>
					</table>
							<h3><a id="anchor_20" class="local" name="anchor_20"></a>创建传感器</h3>
					<p>对该URL的一个HTTP POST请求将为您创建一个新的传感器.</p>

			<h4>URL</h4>

			<p>http://api.Xlink.net/v1.0/sensor/&lt;device_id&gt;/</p>

			<p><em>Note: </em>对该<code>URL</code>的一个<code>HTTP POST</code>请求将为您指定的设备创建一个新的传感器, 其中&lt;device_id&gt;为指定设备的id.</p>

			<h4>请求参数</h4>

			<table class="common">
				<thead>
					<tr>
						<th>参数名</th>
						<th>必需</th>
						<th>类型</th>
						<th>说明</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<th>device_id</th>
						<td>true</td>
						<td>string</td>
						<td>设备ID</td>
					</tr>
				</tbody>
			</table>

			<h4>数据格式</h4>

			<p>JSON</p>

			<h4>数据格式说明</h4>

			<div class="tabs">
			<ul class="tab">
				<li class="select">数值型传感器</li>
				<li>gps型传感器</li>
				<li>泛型传感器</li>
				<li>图像型传感器</li>
			</ul>

			<ul class="tab_content">
				<li style="display: list-item;">
				<table class="common">
					<thead>
						<tr>
							<th>参数名</th>
							<th>必需</th>
							<th>类型</th>
							<th>说明</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th>type</th>
							<td>true</td>
							<td>string</td>
							<td>传感器类型</td>
						</tr>
						<tr>
							<th>title</th>
							<td>true</td>
							<td>string</td>
							<td>传感器标题</td>
						</tr>
						<tr>
							<th>about</th>
							<td>false</td>
							<td>string</td>
							<td>传感器简介</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>unit</th>
							<td>false</td>
							<td>json</td>
							<td>name:string 温度,symbol:float 摄氏度</td>
						</tr>
					</tbody>
				</table>

				<pre>{
			  "type":"value",
			  "title":"test",
			  "about":"test api",
			  "tags":["tag1","tag2"],
			  "unit": {
			     "name": "temperature",
			     "symbol": "C"
			   }
			}</pre>
				</li>
				<li style="display: none;">
				<table class="common">
					<thead>
						<tr>
							<th>参数名</th>
							<th>必需</th>
							<th>类型</th>
							<th>说明</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th>type</th>
							<td>true</td>
							<td>string</td>
							<td>传感器类型</td>
						</tr>
						<tr>
							<th>title</th>
							<td>true</td>
							<td>string</td>
							<td>传感器标题</td>
						</tr>
						<tr>
							<th>about</th>
							<td>false</td>
							<td>string</td>
							<td>传感器简介</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
					</tbody>
				</table>

				<pre>{
			  "type":"gps",
			  "title":"test",
			  "about":"test api",
			  "tags":["tag1","tag2"]
			  
			}</pre>
				</li>
				<li style="display: none;">
				<table class="common">
					<thead>
						<tr>
							<th>参数名</th>
							<th>必需</th>
							<th>类型</th>
							<th>说明</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th>type</th>
							<td>true</td>
							<td>string</td>
							<td>传感器类型</td>
						</tr>
						<tr>
							<th>title</th>
							<td>true</td>
							<td>string</td>
							<td>传感器标题</td>
						</tr>
						<tr>
							<th>about</th>
							<td>false</td>
							<td>string</td>
							<td>传感器简介</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
					</tbody>
				</table>

				<pre>{
			  "type":"gen",
			  "title":"test",
			  "about":"test api",
			  "tags":["tag1","tag2"]
			  
			}</pre>
				</li>
				<li style="display: none;">
				<table class="common">
					<thead>
						<tr>
							<th>参数名</th>
							<th>必需</th>
							<th>类型</th>
							<th>说明</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th>type</th>
							<td>true</td>
							<td>string</td>
							<td>传感器类型</td>
						</tr>
						<tr>
							<th>title</th>
							<td>true</td>
							<td>string</td>
							<td>传感器标题</td>
						</tr>
						<tr>
							<th>about</th>
							<td>false</td>
							<td>string</td>
							<td>传感器简介</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
					</tbody>
				</table>

				<pre>{
			  "type":"photo",
			  "title":"test",
			  "about":"test api",
			  "tags":["tag1","tag2"]
			  
			}</pre>
				</li>
			</ul>
			</div>

			<p><em>Note: </em>若不带"type", 默认为数值型传感器.</p>

			<h4>Method</h4>

			<p>POST</p>

			<h4>返回值</h4>

			<p>新设备的ID</p>

			<table class="common">
				<thead>
					<tr>
						<th>参数名</th>
						<th>类型</th>
						<th>说明</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<th>device_id</th>
						<td>int</td>
						<td>设备id</td>
					</tr>
				</tbody>
			</table>

			<pre>{
			  "sensor_id": 2
			}</pre>

			<h4>访问授权</h4>

			<p>需要在HTTP Header中增加API Key来授权写入操作, 具体请参照<a href="#">API Key</a>.</p>

			<h4>请求实例 (运用curl):</h4>

			<div class="tabs">
			<ul>
				<li>CURL</li>
			</ul>

			<ul>
				<li>
				<pre>curl --request POST --data-binary @datafile.txt
				--header "U-ApiKey: YOUR_API_KEY_HERE" http://api.Xlink.net/v1.0/sensor/12/</pre>

				<p><em>Note:</em>datafile.txt中,需要在HTTP Header中增加API Key来授权写入操作, 具体请参照<a href="#">API Key.</a></p>
				</li>
			</ul>
			</div>
							<h3><a id="anchor_21" class="local" name="anchor_21"></a>编辑传感器</h3>
					<p>根据设备ID编辑已经接入的传感器.</p>

			<h4>URL</h4>

			<p>http://api.Xlink.net/v1.0/sensor/&lt;device_id&gt;/&lt;sensor_id&gt;</p>

			<p><em>Note: </em>对该<code>URL</code>的一个<code>HTTP PUT</code>请求将更新传感器的信息, 其中&lt;device_id&gt;为所要更新的传感器所属设备的id,&lt;sensor_id&gt;为所要更新的传感器的id. 若您的客户端不支持<code>PUT</code>请求, 请使用url方式模拟, 具体参照模拟PUT, DELETE请求.</p>

			<h4>请求参数</h4>

			<table class="common">
				<thead>
					<tr>
						<th>参数名</th>
						<th>必需</th>
						<th>类型</th>
						<th>说明</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<th>device_id</th>
						<td>true</td>
						<td>string</td>
						<td>传感器ID</td>
					</tr>
				</tbody>
			</table>

			<h4>数据格式</h4>

			<p>JSON</p>

			<h4>数据格式说明</h4>

			<div class="tabs">
			<ul class="tab">
				<li class="select">数值型传感器</li>
				<li>gps型传感器</li>
				<li>泛型传感器</li>
				<li>图像型传感器</li>
			</ul>

			<ul class="tab_content">
				<li style="display: list-item;">
				<table class="common">
					<thead>
						<tr>
							<th>参数名</th>
							<th>必需</th>
							<th>类型</th>
							<th>说明</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th>title</th>
							<td>true</td>
							<td>string</td>
							<td>传感器标题</td>
						</tr>
						<tr>
							<th>about</th>
							<td>false</td>
							<td>string</td>
							<td>传感器简介</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>unit</th>
							<td>false</td>
							<td>json</td>
							<td>name:string 温度,symbol:float 摄氏度</td>
						</tr>
					</tbody>
				</table>

				<pre>{
			  "title":"test",
			  "about":"test api",
			  "tags":["tag1","tag2"],
			  "unit": {
			     "name": "temperature",
			     "symbol": "C"
			    }
			}</pre>
				</li>
				<li style="display: none;">
				<table class="common">
					<thead>
						<tr>
							<th>参数名</th>
							<th>必需</th>
							<th>类型</th>
							<th>说明</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th>title</th>
							<td>true</td>
							<td>string</td>
							<td>传感器标题</td>
						</tr>
						<tr>
							<th>about</th>
							<td>false</td>
							<td>string</td>
							<td>传感器简介</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
					</tbody>
				</table>

				<pre>{
			  "title":"test",
			  "about":"test api",
			  "tags":["tag1","tag2"]
			}</pre>
				</li>
				<li style="display: none;">
				<table class="common">
					<thead>
						<tr>
							<th>参数名</th>
							<th>必需</th>
							<th>类型</th>
							<th>说明</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th>title</th>
							<td>true</td>
							<td>string</td>
							<td>传感器标题</td>
						</tr>
						<tr>
							<th>about</th>
							<td>false</td>
							<td>string</td>
							<td>传感器简介</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
					</tbody>
				</table>

				<pre>{
			  "title":"test",
			  "about":"test api",
			  "tags":["tag1","tag2"]
			}</pre>
				</li>
				<li style="display: none;">
				<table class="common">
					<thead>
						<tr>
							<th>参数名</th>
							<th>必需</th>
							<th>类型</th>
							<th>说明</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th>title</th>
							<td>true</td>
							<td>string</td>
							<td>传感器标题</td>
						</tr>
						<tr>
							<th>about</th>
							<td>false</td>
							<td>string</td>
							<td>传感器简介</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
					</tbody>
				</table>

				<pre>{
			  "title":"test",
			  "about":"test api",
			  "tags":["tag1","tag2"]
			}</pre>
				</li>
			</ul>
			</div>

			<h4>Method</h4>

			<p>PUT</p>

			<h4>返回值</h4>

			<p>HTTP Headers only</p>

			<h4>请求实例 (运用curl):</h4>

			<div class="tabs">
			<ul>
				<li>CURL</li>
			</ul>

			<ul>
				<li>
				<pre>curl --request PUT --data-binary @datafile.txt
				--header "U-ApiKey: YOUR_API_KEY_HERE" http://api.Xlink.net/v1.0/sensor/12/3</pre>

				<p><em>Note:</em>需要在HTTP Header中增加API Key来授权写入操作, 具体请参照<a href="#">API Key.</a></p>
				</li>
			</ul>
			</div>				<h3><a id="anchor_22" class="local" name="anchor_22"></a>罗列传感器</h3>
					<h4>URL</h4>

			<p>http://api.Xlink.net/v1.0/sensor/&lt;device_id&gt;/</p>

			<p><em>Note: </em>对该<code>URL</code>的一个<code>HTTP GET</code>请求将得到所有属于某一设备传感器的列表, 为所要罗列的传感器所属的设备id.</p>

			<h4>请求参数</h4>

			<table class="common">
				<thead>
					<tr>
						<th>参数名</th>
						<th>必需</th>
						<th>类型</th>
						<th>说明</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<th>device_id</th>
						<td>true</td>
						<td>string</td>
						<td>设备ID</td>
					</tr>
				</tbody>
			</table>

			<h4>数据格式</h4>

			<p>JSON</p>

			<h4>数据格式说明</h4>

			<table class="common">
				<thead>
					<tr>
						<th>参数名</th>
						<th>必需</th>
						<th>类型</th>
						<th>说明</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<th>id</th>
						<td>true</td>
						<td>int</td>
						<td>设备ID</td>
					</tr>
					<tr>
						<th>title</th>
						<td>true</td>
						<td>string</td>
						<td>设备标题</td>
					</tr>
					<tr>
						<th>about</th>
						<td>false</td>
						<td>string</td>
						<td>设备简介</td>
					</tr>
				</tbody>
			</table>

			<pre>[
			  {
			    "id": 2,
			    "title": "test2",
			    "about": "just a test",
			    "type":0,
			    "last_update": 1380009649,
			    "last_data":"317",
			    "last_data_gen":null
				},
				{
			    "id": 3,
			    "title": "test3",
			    "about": "just a test",
			    "type":6,
			    "last_update": 1380009669,
			    "last_data":null;,
			    "last_data_gen":{"lat":23.8,"lng":54.5,"speed":45}
			  }
			]</pre>

			<h4>Method</h4>

			<p>GET</p>

			<h4>返回值</h4>

			<p>该设备的所有传感器信息</p>

			<h4>访问授权</h4>

			<p>需要在HTTP Header中增加API Key来授权GET操作, 具体请参照<a href="#">API Key</a>.</p>

			<h4>请求实例 (运用curl):</h4>

			<div class="tabs">
			<ul>
				<li>CURL</li>
			</ul>

			<ul>
				<li>
				<pre>curl --request GET --header "U-ApiKey: YOUR_API_KEY_HERE" http://api.Xlink.net/v1.0/sensor/12/</pre>

				<p><em>Note:</em>需要在HTTP Header中增加API Key来授权GET操作, 具体请参照<a href="#">API Key.</a></p>
				</li>
			</ul>
			</div>
							<h3><a id="anchor_23" class="local" name="anchor_23"></a>查看传感器</h3>
					<h4>URL</h4>

			<p>http://api.Xlink.net/v1.0/sensor/&lt;device_id&gt;/&lt;sensor_id&gt;</p>

			<p><em>Note: </em>对该<code>URL</code>的一个<code>HTTP GET</code>请求将得到所要查看传感器的详细内容, 其中&lt;sensor_id&gt;为所要查看的传感器的id,&lt;device_id&gt;为此传感器所属的设备的id.</p>

			<h4>请求参数</h4>

			<table class="common">
				<thead>
					<tr>
						<th>参数名</th>
						<th>必需</th>
						<th>类型</th>
						<th>说明</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<th>device_id</th>
						<td>true</td>
						<td>string</td>
						<td>设备ID</td>
					</tr>
				</tbody>
			</table>

			<h4>数据格式</h4>

			<p>JSON</p>

			<h4>数据格式说明</h4>

			<div class="tabs">
			<ul class="tab">
				<li class="select">数值型传感器</li>
				<li>gps型传感器</li>
				<li>泛型传感器</li>
				<li>图像型传感器</li>
			</ul>

			<ul class="tab_content">
				<li style="display: list-item;">
				<table class="common">
					<thead>
						<tr>
							<th>参数名</th>
							<th>必需</th>
							<th>类型</th>
							<th>说明</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th>title</th>
							<td>true</td>
							<td>string</td>
							<td>设备标题</td>
						</tr>
						<tr>
							<th>about</th>
							<td>false</td>
							<td>string</td>
							<td>设备简介</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>unit_name</th>
							<td>false</td>
							<td>string</td>
							<td>温度</td>
						</tr>
						<tr>
							<th>unit_symbol</th>
							<td>false</td>
							<td>float</td>
							<td>摄氏度</td>
						</tr>
					</tbody>
				</table>

				<pre>[{
			  "title":"test",
			  "about":"just a test",
			  "tags":["tag1","tag2"],
			  "unit_name": "temperature",
			  "unit_symbol": "C"
			}]</pre>
				</li>
				<li style="display: none;">
				<table class="common">
					<thead>
						<tr>
							<th>参数名</th>
							<th>必需</th>
							<th>类型</th>
							<th>说明</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th>title</th>
							<td>true</td>
							<td>string</td>
							<td>设备标题</td>
						</tr>
						<tr>
							<th>about</th>
							<td>false</td>
							<td>string</td>
							<td>设备简介</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
					</tbody>
				</table>

				<pre>{
			  "title":"test",
			  "about":"test api",
			  "tags":["tag1","tag2"]
			}</pre>
				</li>
				<li style="display: none;">
				<table class="common">
					<thead>
						<tr>
							<th>参数名</th>
							<th>必需</th>
							<th>类型</th>
							<th>说明</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th>title</th>
							<td>true</td>
							<td>string</td>
							<td>设备标题</td>
						</tr>
						<tr>
							<th>about</th>
							<td>false</td>
							<td>string</td>
							<td>设备简介</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
					</tbody>
				</table>

				<pre>{
			  "title":"test",
			  "about":"test api",
			  "tags":["tag1","tag2"]
			}</pre>
				</li>
				<li style="display: none;">
				<table class="common">
					<thead>
						<tr>
							<th>参数名</th>
							<th>必需</th>
							<th>类型</th>
							<th>说明</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th>title</th>
							<td>true</td>
							<td>string</td>
							<td>设备标题</td>
						</tr>
						<tr>
							<th>about</th>
							<td>false</td>
							<td>string</td>
							<td>设备简介</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
						<tr>
							<th>tags</th>
							<td>false</td>
							<td>array</td>
							<td>标签数组</td>
						</tr>
					</tbody>
				</table>

				<pre>{
			  "title":"test",
			  "about":"test api",
			  "tags":["tag1","tag2"]
			}</pre>
				</li>
			</ul>
			</div>

			<h4>Method</h4>

			<p>GET</p>

			<h4>返回值</h4>

			<p>请求的传感器信息</p>

			<h4>访问授权</h4>

			<p>需要在HTTP Header中增加API Key来授权GET操作, 具体请参照<a href="#">API Key</a>.</p>

			<h4>请求实例 (运用curl):</h4>

			<div class="tabs">
			<ul>
				<li>CURL</li>
			</ul>

			<ul>
				<li>
				<pre>curl --request GET --header "U-ApiKey: YOUR_API_KEY_HERE" http://api.Xlink.net/v1.0/sensor/12/3</pre>

				<p><em>Note:</em>需要在HTTP Header中增加API Key来授权GET操作, 具体请参照<a href="#">API Key.</a></p>
				</li>
			</ul>
			</div>				<h3><a id="anchor_24" class="local" name="anchor_24"></a>删除传感器</h3>
					<h4>URL</h4>

			<p>http://api.Xlink.net/v1.0/sensor/&lt;device_id&gt;/&lt;sensor_id&gt;</p>

			<p><em>Note: </em>对该<code>URL</code>的一个<code>HTTP DELETE</code>请求将删除指定的传感器, 其中为所要删除的传感器的id, 为该传感器所属的设备的id. 若您的客户端不支持DELETE请求, 请使用url方式模拟, 具体参照模拟PUT, DELETE请求.</p>

			<h4>Method</h4>

			<p>DELETE</p>

			<h4>返回值</h4>

			<p>HTTP Headers only</p>

			<h4>访问授权</h4>

			<p>需要在HTTP Header中增加API Key来授权DELETE操作, 具体请参照<a href="#">API Key</a>.</p>

			<h4>请求实例</h4>

			<div class="tabs">
			<ul>
				<li>CURL</li>
			</ul>

			<ul>
				<li>
				<pre>curl --request DELETE --header "U-ApiKey: YOUR_API_KEY_HERE" http://api.Xlink.net/v1.0/sensor/12/3</pre>

				<p><em>Note:</em>需要在HTTP Header中增加API Key来授权DELETE操作, 具体请参照<a href="#">API Key.</a></p>
				</li>
			</ul>
			</div>
								
					<div class="doc_nav">
						<h4>快速导航</h4>
						<ul>
											<li><a href="#">创建传感器</a></li>
											<li><a href="#">编辑传感器</a></li>
											<li><a href="#">罗列传感器</a></li>
											<li><a href="#">查看传感器</a></li>
											<li><a href="#">删除传感器</a></li>
										</ul>
						
						<div class="navbar"><a class="gotop">GO TOP</a></div>
					</div>
						</div>
			</div>
		</div>
		<div id="bottom">@Xlink 版权所有</div>
		<script type="text/javascript">
		var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
		document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F5f94f1c230854f8066134ebed007b8c7' type='text/javascript'%3E%3C/script%3E"));
		</script><script src="../../../js/pages/xlink/h.js" type="text/javascript"></script><script src="../../../js/pages/xlink/sea-debug.js" data-config="/resource/js/config" data-main="/resource/js/main"></script>
		<script>
		seajs.use(['/resource/js/scroller', '/resource/js/devnav', '/resource/js/searchbar', '/resource/js/devdocnav', '/resource/js/tab'], function(scroller, devnav, Searchbar, devDocnav, tab){
			var Scroller = scroller.Scroller;
			var partnersScroller = new Scroller({
				container: '#forums .mask',
				navBars: {
					prev: '#forums .navbar .prev',
					next: '#forums .navbar .next'
				},
				contentWidth: 1440,
				containerWidth: 815,
				stepLength: 150
			});
			
			var creatorScroller = new Scroller({
				container: '#creator .box',
				navBars: {
					prev: '#creator .navbar .prev',
					next: '#creator .navbar .next'
				},
				contentWidth: 860,
				containerWidth: 430,
				stepLength: 430
			});
			
			devnav.init();
			
			new Searchbar({
				
			});
			new Searchbar({
					container: '#header .subnav .searchbar',
					input: '#header .subnav .searchbar input',
					button: '#header .subnav .searchbar button',
					direction: 'down'
			});
			
			devDocnav.init({
				rel: '#table_device'
			})
			
			tab({
				s_container: '.tabs',
				s_tab: '.tab>li',
				s_content: '.tab_content>li'
			});
		});

		</script>
	</body>
</html>
